<?php

$begin_time = microtime(true);

$str = file_get_contents('d:/test/x.txt');

$hash = get_str_hash('09');

var_dump(strpos($str, $hash));


var_dump(microtime(true) - $begin_time);

var_dump ( get_str_hash ( 'admin' ) );
function get_str_hash($string) {
	$result_str = '';
	$hash = str_split ( md5 ( $string ), 2 );
	$short_hash = array_slice ( $hash, 8, 8 );
	foreach ( $short_hash as $key => $val ) {
		if ($val === '00') {
			foreach ( $hash as $k => $v ) {
				if ($v !== '00') {
					$val = $v;
					unset ( $hash [$k] );
					break;
				}
			}
		}
		$result_str .= chr ( hexdec ( rtrim ( $val, '0' ) ) );
	}
	return $result_str;
}

function get_file_pointer($file_name)
{
	$hash = get_str_hash($file_name);
	
}
?>